#ifndef _CKCONFIG_H_
#define _CKCONFIG_H_



#include "CKUseKJson.h"

namespace K_Engine
{
	class CKConfig
	{
	private:
		KJson::CKJsonControl json;
		std::string m_localhost;
		std::string m_localname;
		std::vector<std::string> m_rule;
		int m_threadsize;
		std::string m_strLastError;
		std::string m_msgtempfile;
		
	protected:
		void SetLastError(std::string strLastError);
		
	public:
		bool LoadConfig(std::string config_json);
		std::string strGetLocalhost() const;
		std::string strGetLocalName() const;
		std::string strGetRule(int n) const;
		std::string strGetMsgTempFile() const;
		int nSizeOfRule() const;
		int nThreadSize() const;
	
	public:
		std::string strGetLastError() const;	
	};
}

#endif // ! _CKCONFIG_H_